<body style="overflow:hidden" class="ui-layout-container">
<link rel="stylesheet" href="static/jquery-ui/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="static/jquery.layout/layout-default-latest.css">

<style type="text/css">
	/* remove padding from the IFRAME-pane */ 
	.ui-layout-pane-center {
		padding: 	0;
	}
	/* masks are normally transparent - make them visible (must 'override' default) */
	.ui-layout-mask {
		background:	#C00;
		opacity:	.20;
		filter:		alpha(opacity=20); /* IE */
	}
</style>
<style type="text/css">
.leftBox, .rightBox{
	display: none;
    float: left;
    width: 49%;
    height: 0;
    margin: 5px;
    background: #90C7FF;
    /*display: inline;*/
    -webkit-transition: width 1s ease;
    -moz-transition: width 1s ease;
    -o-transition: width 1s ease;
    -ms-transition: width 2s ease;
    transition: width 1s ease;
}
.rightBox{
    background: #fffab1;
}
</style>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/jquery.layout/jquery.layout-latest.js"></script>
<script type="text/javascript">
var topLayout;

var dialogOpts = {
    // position: [100, 100],
	autoOpen: false,//如果设置为true，则默认页面加载完毕后，就自动弹出对话框；相反则hidden状态。 
	bgiframe: true, //解决ie6中遮罩层盖不住select的问题  
	width: 600,
	modal:false,//这个就是遮罩效果   
	// buttons: {
	// 	"Ok": function() { 
	// 		test();//在这里调用函数
	// 		$(this).dialog("close"); 
	// 	}, 
	// 	"Cancel": function() { 
	// 		$(this).dialog("close"); 
	// 	} 
	// },
};


$(document).ready(function () {
	var ww=$(window).width();
	var west_size=240,east_size=260;
	if(ww<=800){
		west_size=Math.round(west_size*0.25);
		east_size=Math.round(east_size*0.25);
	}

	topLayout = $('body').layout({
		center__maskContents:	true // IMPORTANT - enable iframe masking
		,	west__size:				west_size
		,	east__size:				east_size
		// ,	south__closable:		false
		// ,	south__size:			18

		,defaults: {
		      fxName:               "slide"
		   ,  fxSpeed:               "slow"
		   ,  spacing_closed:        12
		   ,  initClosed:            false //true
		   }
		,  north: {
		      fxName:                "none"
		   ,  spacing_closed:        8
		   ,  togglerLength_closed:  "100%"
		   ,resizable:true
		   }
		,  south: {
		      fxName:                "none"
		   ,spacing_closed:        1
		   ,closable:false
		   ,resizable:false
		   }

	});

	$('#childIframe').attr('src','blab.php');
	if(ww<=480){
		var adm_div=$('#adm_btn_div').html();
		var usr_div=$('#usr_btn_div').html();
		$('#adm_btn_div').html('');
		$('#usr_btn_div').html('');
		topLayout.removePane('west');
		topLayout.removePane('east');
		$('.leftBox').css('height','auto');
		$('.rightBox').css('height','auto');
		$('.leftBox').css('display','inline');
		$('.rightBox').css('display','inline');

		$('.leftBox').html(usr_div);
		$('.rightBox').html(adm_div);
		$('.pan_cls').hide();
		var tmp_size=Math.round($(window).height()*0.3);
		// alert(sh);
		topLayout.sizePane('south',tmp_size );

		tmp_size=Math.round(ww*0.9);
		dialogOpts = {
		    // position: [100, 100],
			autoOpen: false,//如果设置为true，则默认页面加载完毕后，就自动弹出对话框；相反则hidden状态。 
			bgiframe: true, //解决ie6中遮罩层盖不住select的问题  
			width: tmp_size,
			modal:false,//这个就是遮罩效果   
			// buttons: {
			// 	"Ok": function() { 
			// 		test();//在这里调用函数
			// 		$(this).dialog("close"); 
			// 	}, 
			// 	"Cancel": function() { 
			// 		$(this).dialog("close"); 
			// 	} 
			// },
		};
	}

// dialog test
	// $('#dialog').dialog({
	// 	autoOpen: false,//如果设置为true，则默认页面加载完毕后，就自动弹出对话框；相反则处理hidden状态。 
	// 	bgiframe: true, //解决ie6中遮罩层盖不住select的问题  
	// 	width: 600,
	// 	modal:false,//这个就是遮罩效果   
	// 	buttons: {
	// 		"Ok": function() { 
	// 			test();//在这里调用函数
	// 			$(this).dialog("close"); 
	// 		}, 
	// 		"Cancel": function() { 
	// 			$(this).dialog("close"); 
	// 		} 
	// 	}
 //    });

    $('#dialog').dialog(dialogOpts);

 //    $('#dialog3').dialog(dialogOpts);

 //    $('#dialog4').dialog(dialogOpts);

	$('#usr_btn_roll').click(function(){
		$('#dialog').dialog('open');
		return false;
	});

	// $('#adm_btn_pc').click(function(){
	// 	$('#dialog').dialog('open');
	// 	return false;
	// });
	// $('#adm_btn_roll').click(function(){
	// 	$('#dialog').dialog('open');
	// 	return false;
	// });
	// $('#adm_btn_npc').click(function(){
	// 	$('#dialog').dialog('open');
	// 	return false;
	// });
	// $('#adm_btn_env').click(function(){
	// 	$('#dialog').dialog('open');
	// 	return false;
	// });

	// $('#adm_btn_res').click(function(){
	// 	$('#dialog').dialog('open');
	// 	return false;
	// });

// dialog test end

	$( ".ui_btn" ).click(function(){
		$('#dialog').dialog('open');
		return false;
	});

	$( ".ui_btn" ).button();
	$( ".ui_btn2" ).button();
	$( "#radio_dicefaces" ).buttonset();

	$('.mini_in').css('width','50px');
});

    function test()
    {
        alert("调用");
    }  
 

</script>

<!-- <IFRAME id="childIframe" name="childIframe" class="ui-layout-center" scrolling="auto"
	src="local_iframe.html"></IFRAME> -->
<IFRAME id="childIframe" name="childIframe" class="ui-layout-center" scrolling="auto" src=""></IFRAME>

<div id="adm_btn_div" class="ui-layout-west hide" style="background: #90C7FF;"> West GM专用功能区
	<div class="pan_cls ui_btn2"><BUTTON onclick="$(this).closest('.ui-layout-pane').trigger('layoutpaneclose')"
	>Close Me</BUTTON></div>

	<p><button onclick="location.href='join_world.php';" class="ui_btn2">切换战役</button></p>

<!-- 
<fieldset>
<legend>角色信息</legend>

</fieldset>	
 -->

<fieldset>
<legend>常用</legend>
<input type="button" id="adm_btn_pc" value="玩家管理" class="ui_btn" />&nbsp;
<input type="button" id="adm_btn_roll" value="投骰管理" class="ui_btn"/>&nbsp;
<input type="button" id="adm_btn_npc" value="NPC/怪物管理" class="ui_btn"/>&nbsp;
</fieldset>	

<fieldset>
<legend>系统</legend>
	<input type="button" id="adm_btn_env" value="场景管理" class="ui_btn" />&nbsp;
	<input type="button" id="adm_btn_room" value="战役管理" class="ui_btn"/>&nbsp;
	<input type="button" id="adm_btn_res" value="资源管理" class="ui_btn"/>&nbsp;
	<input type="button" id="adm_btn_map" value="战术地图管理" class="ui_btn"/>&nbsp;
</fieldset>	

<fieldset>
<legend>扩展</legend>
<input type="button" id="adm_btn_font" value="字体设置" class="ui_btn"/>&nbsp;
	<input type="button" id="adm_btn_log" value="提取日志" class="ui_btn"/>&nbsp;
</fieldset>	

</div>

<div id="usr_btn_div" class="ui-layout-east hide" style="background: #fffab1;"> East 玩家功能区
	<div class="pan_cls ui_btn">
	<BUTTON onclick="$(this).closest('.ui-layout-pane').trigger('layoutpaneclose')">Close Me</BUTTON>
	</div>

	<p>
<fieldset>
<legend>角色信息</legend>
<button onclick="pc_card();" class="ui_btn">人物</button>
<button onclick="pc_bag();" class="ui_btn">物品</button>
<button onclick="pc_btn(3);" class="ui_btn">xx</button>
</fieldset>	
	</p>

	<p><div>
		<fieldset>
<legend>骰子</legend>
数量：<input class="mini_in" type="text" id="dicenum" name="dicenum" value="1" size="10" maxlength="3" autocomplete="off">
面数：<div id="radio_dicefaces">
    <input type="radio" id="dicefaces4" name="dicefaces"><label for="dicefaces4">D4</label>
    <input type="radio" id="dicefaces6" name="dicefaces"><label for="dicefaces6">D6</label>
    <input type="radio" id="dicefaces8" name="dicefaces"><label for="dicefaces8">D8</label>
    <input type="radio" id="dicefaces10" name="dicefaces"><label for="dicefaces10">D10</label>
    <input type="radio" id="dicefaces12" name="dicefaces"><label for="dicefaces12">D12</label>
    <input type="radio" id="dicefaces20" name="dicefaces" checked="checked"><label for="dicefaces20">D20</label>
    <input type="radio" id="dicefaces100" name="dicefaces"><label for="dicefaces100">D100</label>
  </div>
修正值：<input class="mini_in" type="text" id="offset" name="offset" size="10" maxlength="3" value="0">
原因：<input type="text" id="reason" name="reason" size="30" maxlength="100" value="reason">
<input type="button" id="usr_btn_roll" value="掷骰/Roll" class="ui_btn2"/>

</fieldset>	
	</div>

	</p>

	<p>
<fieldset><legend>场景预置动作</legend>
<?php
for ($i=1; $i <=9  ; $i++) { 
	echo '<button onclick="btn_ud('.$i.');">动作#'.$i.'</button>'.PHP_EOL;
}
?>
</fieldset>
	</p>
	
	<p>
<fieldset><legend>[自定义动作]鉴定</legend>
<?php
for ($i=1; $i < 16 ; $i++) { 
	echo '<button onclick="btn_ud('.$i.');">动作#'.$i.'</button>'.PHP_EOL;
}
?>
</fieldset>
	</p>

	<p>
<fieldset><legend>[自定义动作]战斗</legend>
<?php
for ($i=1; $i < 9 ; $i++) { 
	echo '<button onclick="btn_ud('.$i.');">动作#'.$i.'</button>'.PHP_EOL;
}
?>
</fieldset></p>

	<p>
<fieldset><legend>[自定义动作]日常</legend>
<?php
for ($i=1; $i < 6 ; $i++) { 
	echo '<button onclick="btn_ud('.$i.');">动作#'.$i.'</button>'.PHP_EOL;
}
?>
</fieldset></p>


<div class="hide">
<div>
    <div id="dialog" title="嘿嘿" style="">
        <p>
            还没做好啊！</p>
    </div>
    <div id="dialog2" title="嘿嘿" style="">
        <p>
            还没做好啊！</p>
    </div>
    <div id="dialog3" title="嘿嘿" style="">
        <p>
            还没做好啊！</p>
    </div>
    <div id="dialog4" title="嘿嘿" style="">
        <p>
            还没做好啊！</p>
    </div>
</div>
</div>

</div>

<div id="env_desc_div" class="ui-layout-north hide"> North 场景描述信息区</div>

<div id="site_foot" class="ui-layout-south hide">
<a href="index.php">Back to Dashboard</a>
<div class="mobile1 ">
  <div class="leftBox"></div>
  <div class="rightBox "></div>
</div>
<?php echo site_foot_html(); ?>
</div>


</body></html>